using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public partial class SIGModePlayerExecutor : MonoBehaviour
{
    private ISIGPlayer _player;
    private bool _isTeamEscort;
    private SIGModeMainExecutor _SIGModeMainExecutor;

    public void LoadResource() { }

    private void OnEnable()
    {
        _SIGModeMainExecutor.ModeEnable();
    }

    private void OnDisable()
    {
        _SIGModeMainExecutor.ModeDisable();
    }

    public void AssignTeam(bool isTeamEscort)
    {
        _isTeamEscort = isTeamEscort;
    }

    private void SceneLoad()
    {
        if (_isTeamEscort)
        {
            SceneManager.LoadScene("TeamEscort_Loading");
        }
        else
        {
            SceneManager.LoadScene("TeamAmbush_Loading");
        }
    }
}

public partial class SIGModePlayerExecutor : MonoBehaviour
{
    public void Communicate(int messageNum)
    {
        _SIGModeMainExecutor.Communicate(messageNum, _isTeamEscort);
    }

    public void Land(Vector3 landZonePosition)
    {
        _SIGModeMainExecutor.Land(landZonePosition, _player);
        //player animation play
    }

    public void Respawn(Vector3 respawnPosition, int respawnPoint)
    {
        if ((respawnPoint == -1)//if select the entrancePoint
                || (_SIGModeMainExecutor._respawnPointTeamEscort[respawnPoint]._isAvailable))
        {
            _SIGModeMainExecutor.Respawn(respawnPosition, _player);
            //player animation play
        }
    }
}
